package com.helei.security.component;

import com.helei.data.entity.SysMenu;
import com.helei.security.entity.SecurityUserEntity;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.List;

/**
 * @author hl
 * @date 2021/3/11 11:35
 * @description MyUser
 */
public class UserAuthentication extends User {
    private static final long serialVersionUID = -5302718296398589381L;
    private SecurityUserEntity extendUserBean;
    private List<String> roles;
    private List<SysMenu> menu;

    public UserAuthentication(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public SecurityUserEntity getExtendUserBean() {
        return extendUserBean;

    }

    public void setExtendUserBean(SecurityUserEntity extendUserBean) {
        this.extendUserBean = extendUserBean;

    }

    public List<String> getRoles() {
        return roles;
    }

    public void setRoles(List<String> roles) {
        this.roles = roles;
    }

    public List<SysMenu> getMenu() {
        return menu;
    }

    public void setMenu(List<SysMenu> menu) {
        this.menu = menu;
    }
}